/* eslint-disable @typescript-eslint/no-unsafe-call */
import { IsString, IsNotEmpty, Length } from 'class-validator';

export class CreateLoginDto {
  @IsNotEmpty({ message: '用户名不能为空' })
  @Length(3, 20, {
    message: '用户名长度为3-20位',
  })
  name: string = '';

  @IsString({ message: '密码必须是字符串' })
  @IsNotEmpty({ message: '密码不能为空' })
  password: string = ''; // 默认值为空字符串
}
